package com.dap.dao.model;

import java.io.Serializable;
import java.util.List;

/**
 * Created by wangmin on 2017/11/7.
 */
public class BaseBeanQuery implements Serializable {
    /**
     * order by 排序语句
     * 对应数据库表字段 advertisement
     */
    protected List<Order> orderBy;
    protected boolean distinct;

    protected Integer pageIndex;
    protected Integer pageSize;


    public void addOrderBy(Order order) {
        if (null == this.orderBy)
            this.orderBy = new java.util.ArrayList<>();
        this.orderBy.add(order);
    }
    public void setPageIndexAndSize(Integer pageIndex, Integer pageSize) {
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
    }



    public List<Order> getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(List<Order> orderBy) {
        this.orderBy = orderBy;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
